/*
 * Copyright (c) 2005, 2014 vacoor
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package org.vacoor.nothing.web.dao.support.hbn.criterion;

import org.hibernate.criterion.Example;
import org.hibernate.type.Type;

/**
 * Implementation of {@link org.hibernate.criterion.Example.PropertySelector} for exclude empty string
 *
 * @author vacoor
 */

public class NotEmptyPropertySelector implements Example.PropertySelector{
	private static final long serialVersionUID = 545812420628027544L;

	@Override
    public boolean include(Object propertyValue, String propertyName, Type type) {
        return (propertyValue != null && !"".equals(propertyValue));
    }

}
